export const getVideoTime = (file)=>{
    const fileUrl = URL.createObjectURL(file);
    return new Promise((resolve,reject)=>{
        const video = document.createElement('video');
        video.src = fileUrl;
        video.addEventListener('loadedmetadata',()=>{
            resolve(video.duration);
        })
    })
}